import { defineStore } from 'pinia'
import { ref } from 'vue'
// token
export const useToken = defineStore('token',
  () => {
    const token = ref('')
    const change = (value: string) => { token.value = value }
    return { token, change }
  },
  {
    persist: true // 状态持久化，传入参数
  }
)